LEAP interpreter Programming Manual

I gave up indicating the bit numbers for the binary display of the opcode, because Lockheed number from left to right (0,1,2..15), and from my microprocessor experience, I number the bit positions right to left (15,14,13..0).

Not all the instructions have been determined.

ADB <byte>

1000 11mm mmmm mmmh

Using operand, with LSB (h) determining lower byte or upper byte and dividing operand by two for the word address (m). The accumulator is then added to this byte and stored into the intepreter's accumulator.

Range of instances8C09-8C57
Routine address031E
Number of instances9
031E 43DA         JMM   P  3da   55  31f ......n pick up byte, byte address
03DA 2239         STX   P  239   55  31f ......n save return address
03DB 0C91         LRO        1   2a  31f C.....n divide accumulator by 2
03DC 0600         XXA           31f   2a C.....n put into X
03DD DE34         LDA IXP  234 4286   2a C.....n A=0473+X=(0234)+X
03DE 0402         SNC      3e1 4286   2a C.....n even accumulator?
03DF B3ED         ANA   P  3ed   86   2a C.....n no, LS byte, 03ED=00FF
03E0 5A39         JMP I P  239   86   2a C.....n return
031F 5336         JMP   P  336   86   2a C.....n
0336 8232         ADD   P  232   86   2a ......n accumulator
0337 52AC         JMP   P  2ac   86   2a ......n
02AC 6232         STA   P  232   86   2a ......n accumulator
02AD 5289         JMP   P  289   86   2a ......  next instruction

ADD <memory>

0110 11mm mmmm mmmm

Add memory to accumulator.

Range of instances6C03-6C83
Routine address0334
Number of instances24
0334 0600         XXA             0   55 ......n
0335 DE34         LDA IXP  234 c1d3   55 ......n base of interpreter memory
0336 8232         ADD   P  232 c259   55 ......n accumulator
0337 52AC         JMP   P  2ac c259   55 ......n
02AC 6232         STA   P  232 c259   55 ......n accumulator
02AD 5289         JMP   P  289 c259   55 ......  next instruction

ADD immediate

1010 11nn nnnn nnnn

Add the number operand to accumlator.

Range of instancesAC01-ACB0
Routine address0336
Number of instances38
0336 8232         ADD   P  232 c2ae    0 ......n accumulator
0337 52AC         JMP   P  2ac c2ae    0 ......n
02AC 6232         STA   P  232 c2ae    0 ......n accumulator
02AD 5289         JMP   P  289 c2ae    0 ......  next instruction

AND <memory>

1011 01mm mmmm mmmm

Memory anded with accumulator.

Range of instancesB40E-B463
Routine address02D3
Number of instances12
02D3 0600         XXA             0   55 ......n
02D4 DE34         LDA IXP  234    0   55 ......n base of interpreter memory
02D5 B232         ANA   P  232    0   55 ......n accumulator
02D6 52AC         JMP   P  2ac    0   55 ......n
02AC 6232         STA   P  232    0   55 ......n accumulator
02AD 5289         JMP   P  289    0   55 ......  next instruction

BC <memory>,<bit>

0101 10------ mmmm bbbb

Clear bit at position bbbb(0-15) in memory mmmm(00-0F). Only the first 16 locations of memory (0473-0482) can be accessed.

Range of instances5820-58DE
Routine address0302
Number of instances33
0302 C3F1         LDX   P  3f1   55    0 ......n 0
0303 2237         STX   P  237   55    0 ......n
0304 43CB         JMM   P  3cb   55  305 ......n extract nibble 3 and 4
03CB 0CB4         LRC        4 5005  305 ......n nibble 3
03CC 723B         STR   P  23b 5005  305 ......n save
03CD 0C9C         LRO       12    5  305 ......n nibble 4
03CE 623C         STA   P  23c    5  305 ......n save
03CF 07C0         JMX        0    5  305 ......n return
0305 08B0         ADI       b0   b5  305 ......n
0306 730D         STR   P  30d   b5  305 ......n self modifying code
0307 D237         LDA   P  237    0  305 ......n
0308 0C91         LRO        1    0  305 ......n
0309 C23B         LDX   P  23b    0    5 ......n
030A 05D0         REX        0    0    5 ......n
030B D3F2         LDA   P  3f2 7fff    5 ......n
030C 01C0         ADC          7fff    5 ......n
030D 0CB5         LRC        5 fbff    5 C.....n modified operand
030E 0412         SNV      311 fbff    5 C.....n
0311 BE34         ANA IXP  234    0    5 C.....n base of interpreter memory
0312 532C         JMP   P  32c    0    5 C.....n
032C 6E34         STA IXP  234    0    5 C.....n base of interpreter memory
032D 5289         JMP   P  289    0    5 C.....  next instruction

BS <memory>,<bit>

0101 01------ mmmm bbbb

Set bit at position bbbb(0-15) in memory mmmm(00-0F). Only the first 16 locations of memory (0473-0482) can be accessed.

Range of instances5410-54E0
Routine address0300
Number of instances96
0300 C3EF         LDX   P  3ef   55    1 ......n 1
0301 5303         JMP   P  303   55    1 ......n
0303 2237         STX   P  237   55    1 ......n
0304 43CB         JMM   P  3cb   55  305 ......n extract nibble 3 and 4
03CB 0CB4         LRC        4 5005  305 ......n nibble 3
03CC 723B         STR   P  23b 5005  305 ......n save
03CD 0C9C         LRO       12    5  305 ......n nibble 4
03CE 623C         STA   P  23c    5  305 ......n save
03CF 07C0         JMX        0    5  305 ......n return
0305 08B0         ADI       b0   b5  305 ......n
0306 730D         STR   P  30d   b5  305 ......n self modifying code
0307 D237         LDA   P  237    1  305 ......n
0308 0C91         LRO        1    0  305 C.....n
0309 C23B         LDX   P  23b    0    5 C.....n
030A 05D0         REX        0    0    5 C.....n
030B D3F2         LDA   P  3f2 7fff    5 C.....n
030C 01C0         ADC          8000    5 .V....n
030D 0CB5         LRC        5  400    5 .V....n modified operand
030E 0412         SNV      311  400    5 .V....n
030F AE34         ORA IXP  234  400    5 .V....n base of interpreter memory
0310 532C         JMP   P  32c  400    5 .V....n
032C 6E34         STA IXP  234  400    5 .V....n base of interpreter memory
032D 5289         JMP   P  289  400    5 .V....  next instruction

BTC <memory>,<bit>

0101 00------ mmmm bbbb

Test for clear bit at position bbbb(0-15) in memory mmmm(00-0F). If the bit is zero then skip the next interpreter instruction. Only the first 16 locations of memory (0473-0482) can be accessed.

Range of instances5010-50F0
Routine address0316
Number of instances75
0316 43D0         JMM   P  3d0   55  317 ......n extract memory bit at position
03D0 2239         STX   P  239   55  317 ......n save return address
03D1 43CB         JMM   P  3cb   55  3d2 ......n extract nibble 3 and 4
03CB 0CB4         LRC        4 5005  3d2 ......n nibble 3
03CC 723B         STR   P  23b 5005  3d2 ......n save
03CD 0C9C         LRO       12    5  3d2 ......n nibble 4
03CE 623C         STA   P  23c    5  3d2 ......n save
03CF 07C0         JMX        0    5  3d2 ......n return
03D2 0830         ADI       30   35  3d2 ......n
03D3 73D7         STR   P  3d7   35  3d2 ......n self modifying code
03D4 C23B         LDX   P  23b   35    5 ......n
03D5 DE34         LDA IXP  234  400    5 ......n
03D6 0C31         LLC        1  800    5 ......n
03D7 0C35         LLC        5    1    5 C.....n modified operand
03D8 B3EF         ANA   P  3ef    1    5 C.....n
03D9 5A39         JMP I P  239    1    5 C.....n return
0317 04D1         SAG      319    1    5 C.....n no skip
0319 5289         JMP   P  289    1    5 C.....  next instruction

BTS <memory>,<bit>

0100 11------ mmmm bbbb

Test for bit at position bbbb(0-15) in memory mmmm(00-0F). If the bit is set then skip the next interpreter instruction. Only the first 16 locations of memory (0473-0482) can be accessed.

Range of instances4C21-4CF0
Routine address0313
Number of instances58
0313 43D0         JMM   P  3d0   55  314 ......n extract memory bit at position
03D0 2239         STX   P  239   55  314 ......n save return address
03D1 43CB         JMM   P  3cb   55  3d2 ......n extract nibble 3 and 4
03CB 0CB4         LRC        4 5005  3d2 ......n nibble 3
03CC 723B         STR   P  23b 5005  3d2 ......n save
03CD 0C9C         LRO       12    5  3d2 ......n nibble 4
03CE 623C         STA   P  23c    5  3d2 ......n save
03CF 07C0         JMX        0    5  3d2 ......n return
03D2 0830         ADI       30   35  3d2 ......n
03D3 73D7         STR   P  3d7   35  3d2 ......n self modifying code
03D4 C23B         LDX   P  23b   35    5 ......n
03D5 DE34         LDA IXP  234  400    5 ......n
03D6 0C31         LLC        1  800    5 ......n
03D7 0C35         LLC        5    1    5 C.....n modified operand
03D8 B3EF         ANA   P  3ef    1    5 C.....n
03D9 5A39         JMP I P  239    1    5 C.....n return
0314 04D3         SAG      318    1    5 C.....n skip required
0318 E233         INC   P  233    1    5 C.....n advance program counter
0319 5289         JMP   P  289    1    5 C.....

CLB <memory>

1001 01mm mmmm mmmh

Using operand, with LSB (h) determining lower byte or upper byte and dividing operand by two for the word address (m). Clear this byte.

Range of instances9409-94AA
Routine address0322
Number of instances19
0322 C3F1         LDX   P  3f1   55    0 ......n 0
0323 0C91         LRO        1   2a    0 C.....n divide accumulator by two
0324 0600         XXA             0   2a C.....n put into X
0325 0402         SNC      328    0   2a C.....n even accumulator?
0326 7E34         STR IXP  234    0   2a C.....n no, memory LS byte cleared
0327 5289         JMP   P  289    0   2a C.....  next instruction

CLR <memory>

0111 01mm mmmm mmmm

Clear memory word.

Range of instances7401-746B
Routine address033C
Number of instances37
033C 0600         XXA             0   55 ......n memory location
033D 0540         CLA             0   55 ......n 
033E 532C         JMP   P  32c    0   55 ......n
032C 6E34         STA IXP  234    0   55 ......n accumulator
032D 5289         JMP   P  289    0   55 ......  next instruction

CMB

1000 10mm mmmm mmmh

Using operand, with LSB (h) determining lower byte or upper byte and dividing operand by two for the word address (m). This byte is then compared with the accumulator.

Range of instances8801-886C
Routine address031C
Number of instances9
031C 43DA         JMM   P  3da   55  31d ......n pick up byte, byte address
03DA 2239         STX   P  239   55  31d ......n save return address
03DB 0C91         LRO        1   2a  31d C.....n divide accumulator by 2
03DC 0600         XXA           31d   2a C.....n put into X
03DD DE34         LDA IXP  234 4286   2a C.....n A=0473+X=(0234)+X
03DE 0402         SNC      3e1 4286   2a C.....n even accumulator?
03DF B3ED         ANA   P  3ed   86   2a C.....n no, LS byte, 03ED=00FF
03E0 5A39         JMP I P  239   86   2a C.....n return
031D 52FA         JMP   P  2fa   86   2a C.....n
02FA 9232         SUB   P  232   86   2a ......n byte - accumulator
02FB 0100         TWA          ff7a   2a ......n accumulator - byte
02FC 623E         STA   P  23e ff7a   2a ......n arithmetic result
02FD 5289         JMP   P  289 ff7a   2a ......  next instruction

CMP <memory>

0110 10mm mmmm mmmm

Compare memory from accumulator.

Range of instances680F-6884
Routine address0331
Number of instances51
0331 0600         XXA             0   55 ......n
0332 DE34         LDA IXP  234 ff7a   55 ......n A=0473+X=(0234)+X
0333 52FA         JMP   P  2fa ff7a   55 ......n
02FA 9232         SUB   P  232    0   55 ......n accumulator - memory
02FB 0100         TWA             0   55 C.....n memory - accumulator
02FC 623E         STA   P  23e    0   55 C.....n arithmetic result
02FD 5289         JMP   P  289    0   55 C.....  next instruction

CMP immediate

1010 10nn nnnn nnnn

Compare immediate with accumulator.

Range of instancesA800-A8FF
Routine address02FA
Number of instances99
02FA 9232         SUB   P  232 c228    0 C.....n accumulator - immediate
02FB 0100         TWA          3dd8    0 ......n immediate - accumulator
02FC 623E         STA   P  23e 3dd8    0 ......n arithmetic result
02FD 5289         JMP   P  289 3dd8    0 ......  next instruction

CMP <memory>,<bit>

0100 10------ mmmm bbbb

Compare bit in memory.

Range of instances48xx
Routine address02F9
Number of instances0
02F9 43D0         JMM   P  3d0   55  2fa ......n extract memory bit at position
03D0 2239         STX   P  239   55  2fa ......n
03D1 43CB         JMM   P  3cb   55  3d2 ......n extract nibble 3 and 4
03CB 0CB4         LRC        4 5005  3d2 ......n nibble 3
03CC 723B         STR   P  23b 5005  3d2 ......n save
03CD 0C9C         LRO       12    5  3d2 ......n nibble 4
03CE 623C         STA   P  23c    5  3d2 ......n save
03CF 07C0         JMX        0    5  3d2 ......n return
03D2 0830         ADI       30   35  3d2 ......n
03D3 73D7         STR   P  3d7   35  3d2 ......n self modifying code
03D4 C23B         LDX   P  23b   35    5 ......n
03D5 DE34         LDA IXP  234 1000    5 ......n
03D6 0C31         LLC        1 2000    5 ......n
03D7 0C35         LLC        5    4    5 ......n modified operand
03D8 B3EF         ANA   P  3ef    0    5 ......n
03D9 5A39         JMP I P  239    0    5 ......n
02FA 9232         SUB   P  232 c3f8    5 C.....n
02FB 0100         TWA          3c08    5 ......n
02FC 623E         STA   P  23e 3c08    5 ......n arithmetic result
02FD 5289         JMP   P  289 3c08    5 ......  next instruction

ERR

1110 00?? ???? ????

Exit LEAP to DEVSYS.

Range of instancesE000
Routine address036A
Number of instances1
036A 0D01         LDI        1    1    0 ......n
036B 4BE8         JMM I P  3e8    1  36c ......n
0067 0DBF         LDI       bf   bf  36c ......n '?'
0068 4271         JMM   P   71   bf   69 ......n print
0071 0B02         EDO        2   bf   69 ......n
0073 07C0         JMX        0   bf   69 ......n
0069 5240         JMP   P   40   bf   69 ......n
0040 4306         JMM   P  106   bf   41 ......  start of DEVSYS

JEQ <location>

0001 1ddd dddd dddd

Jump to destination if accumulator is zero.

Range of instances1802-1F77
Routine address02E7
Number of instances59
02E7 D23E         LDA   P  23e    0    0 ......n arithmetic result
02E8 04A9         SAZ      2f2    0    0 ......n
02F2 DA33         LDA I P  233   55    0 ......n interpreter program counter
02F3 B3F0         ANA   P  3f0   55    0 ......n (03F0)=07FF low 10 bits
02F4 8235         ADD   P  235   55    0 ......n (0235)=04FC base of code
02F5 6233         STA   P  233   55    0 ......n interpreter program counter
02F6 528A         JMP   P  28a   55    0 ......  jump to that address

JGT <location>

0010 0ddd dddd dddd

Jump to destination if accumulator is greater than zero.

Range of instances2002-27CA
Routine address02ED
Number of instances33
02ED D23E         LDA   P  23e    0    0 ......n arithmetic result
02EE 04D3         SAG      2f2    0    0 ......n no skip, not greater than zero
02EF 5289         JMP   P  289    0    0 ......  next instruction

JMI <location>

0010 1ddd dddd dddd

Jump to destination if accumulator is less than zero.

Range of instances2800-2FC2
Routine address02EA
Number of instances36
02EA D23E         LDA   P  23e    0    0 ......n arithmetic result
02EB 04B6         SAN      2f2    0    0 ......n no skip, not less than zero
02EC 5289         JMP   P  289    0    0 ......  next instruction

JMP <location>

0000 1ddd dddd dddd

Jump to location.

Range of instances0803-0FED
Routine address02F2
Number of instances143
02F2 DA33         LDA I P  233 502d    0 ......n current instruction
02F3 B3F0         ANA   P  3f0   2d    0 ......n (03F0)=07FF low 10 bits
02F4 8235         ADD   P  235  529    0 ......n (0235)=04FC base of code
02F5 6233         STA   P  233  529    0 ......n interpreter program counter
02F6 528A         JMP   P  28a  529    0 ......  jump to that address

JMP [indirect]

0011 10mm mmmm mmm---

Jump indirectly to location pointed to by operand divided by 2.

Range of instances3800
Routine address0364
Number of instances3
0364 43C1         JMM   P  3c1   55  365 ......n convert byte address into word
03C1 D232         LDA   P  232    0  365 ......n accumulator
03C2 223A         STX   P  23a    0  365 ......n save return address
03C3 0C91         LRO        1    0  365 ......n divide by two
03C4 0600         XXA           365    0 ......n put into X
03C5 0700         LAX        0    0    0 ......n pick up word
03C6 5A3A         JMP I P  23a    0    0 ......n return
0365 52F5         JMP   P  2f5    0    0 ......n
02F5 6233         STA   P  233    0    0 ......n interpreter program counter
02F6 528A         JMP   P  28a    0    0 ......  jump to that address

JNE <location>

0011 0ddd dddd dddd

Jump to destination if accumulator is not zero.

Range of instances3002-37CA
Routine address02F0
Number of instances35
02F0 D23E         LDA   P  23e    0    0 ......n arithmetic result
02F1 04AB         SAZ      2fd    0    0 ......n no skip, equal to zero
02FD 5289         JMP   P  289    0    0 ......  next instruction

JSR <location>

0001 0ddd dddd dddd

Save program counter on stack and jump to subroutine.

Range of instances1003-17AD
Routine address02E3
Number of instances184
02E3 C233         LDX   P  233   55    0 ......n interpreter program counter
02E4 2A3D         STX I P  23d   55    0 ......n push counter on to stack
02E5 E23D         INC   P  23d   55    0 ......n bump stack pointer
02E6 52F2         JMP   P  2f2   55    0 ......n go to routine
02F2 DA33         LDA I P  233    0    0 ......n current instruction
02F3 B3F0         ANA   P  3f0    0    0 ......n (03F0)=07FF low 11 bits
02F4 8235         ADD   P  235  4fc    0 ......n (0235)=04FC base of code
02F5 6233         STA   P  233  4fc    0 ......n interpreter program counter
02F6 528A         JMP   P  28a  4fc    0 ......  jump to that address

LDA <memory>

0110 01mm mmmm mmmm

Load memory word into accumulator.

Range of instances6401-6488
Routine address032E
Number of instances208
032E 0600         XXA             0   55 ......n
032F DE34         LDA IXP  234    0   55 ......n base of interpreter memory
0330 52AC         JMP   P  2ac    0   55 ......n
02AC 6232         STA   P  232    0   55 ......n accumulator
02AD 5289         JMP   P  289    0   55 ......  next instruction

LDA immediate

1010 01nn nnnn nnnn

Load the number operand to accumlator.

Range of instancesA400-A4FF
Routine address02AC
Number of instances60
02AC 6232         STA   P  232   55    0 ......n accumulator
02AD 5289         JMP   P  289   55    0 ......  next instruction

LDA <memory>,<bit>

0100 01------ mmmm bbbb

Load accumulator bit at position bbbb(0-15) in memory mmmm(00-0F). Only the first 16 locations can be accessed.

Range of instances4424-44DF
Routine address02F7
Number of instances17
02F7 43D0         JMM   P  3d0   55  2f8 ......n extract memory bit at position
03D0 2239         STX   P  239   55  2f8 ......n
03D1 43CB         JMM   P  3cb   55  3d2 ......n extract nibble 3 and 4
03CB 0CB4         LRC        4 5005  3d2 ......n nibble 3
03CC 723B         STR   P  23b 5005  3d2 ......n save
03CD 0C9C         LRO       12    5  3d2 ......n nibble 4
03CE 623C         STA   P  23c    5  3d2 ......n save
03CF 07C0         JMX        0    5  3d2 ......n return
03D2 0830         ADI       30   35  3d2 ......n
03D3 73D7         STR   P  3d7   35  3d2 ......n self modifying code
03D4 C23B         LDX   P  23b   35    5 ......n
03D5 DE34         LDA IXP  234    0    5 ......n
03D6 0C31         LLC        1    0    5 ......n
03D7 0C35         LLC        5    0    5 ......n modified operand
03D8 B3EF         ANA   P  3ef    0    5 ......n
03D9 5A39         JMP I P  239    0    5 ......n
02F8 52AC         JMP   P  2ac    0    5 ......n
02AC 6232         STA   P  232    0    5 ......n accumulator
02AD 5289         JMP   P  289    0    5 ......  next instruction

LDB <memory>

1000 01mm mmmm mmmh

Using operand, with LSB (h) determining lower byte or upper byte and dividing operand by two for the word address (m). The accumulator is then loaded with this byte.

Range of instances8401-84AA
Routine address031A
Number of instances75
031A 43DA         JMM   P  3da   55  31b ......n pick up byte, byte address
03DA 2239         STX   P  239   55  31b ......n save return address
03DB 0C91         LRO        1   2a  31b C.....n divide accumulator by 2
03DC 0600         XXA           31b   2a C.....n put into X
03DD DE34         LDA IXP  234 4286   2a C.....n A=0473+X=(0234)+X
03DE 0402         SNC      3e1 4286   2a C.....n even accumulator?
03DF B3ED         ANA   P  3ed   86   2a C.....n no, LS byte, 03ED=00FF
03E0 5A39         JMP I P  239   86   2a C.....n return
031B 52AC         JMP   P  2ac   86   2a C.....n
02AC 6232         STA   P  232   86   2a C.....n accumulator
02AD 5289         JMP   P  289   86   2a C.....  next instruction

MUL <memory>

1001 11mm mmmm mmmm

Multiply accumulator by memory.

Range of instances9C2F-9C4F
Routine address029B
Number of instances6
029B 0600         XXA             0   55 ......n operand to X
029C 0540         CLA             0   55 ......n
029D 6237         STA   P  237    0   55 ......n
029E DE34         LDA IXP  234    0   55 ......n get variable
029F 04AB         SAZ      2ab    0   55 ......n skip if zero
02AB D237         LDA   P  237    0   55 ......n
02AC 6232         STA   P  232    0   55 ......n accumulator
02AD 5289         JMP   P  289    0   55 ......  next instruction

OR <memory>

1011 10mm mmmm mmmm

Memory ored with accumulator.

Range of instancesB80E-B864
Routine address02D7
Number of instances4
02D7 0600         XXA             0   55 ......n
02D8 DE34         LDA IXP  234 c1d3   55 ......n base of interpreter memory
02D9 A232         ORA   P  232 fddb   55 ......n accumulator
02DA 52AC         JMP   P  2ac fddb   55 ......n
02AC 6232         STA   P  232 fddb   55 ......n accumulator
02AD 5289         JMP   P  289 fddb   55 ......  next instruction

OUT

0000 01?? ???? ????

Output to printer.

Range of instances0400-0401
Routine address0366
Number of instances2
0366 04A2         SAZ      369
...

RTS

0000 00------ ------------ ------------

Return from subroutine.

Range of instances0000
Routine address0295
Number of instances65
0295 C23D         LDX   P  23d   55  23f ......n stack pointer
0296 0241         DNX      298   55  23e ......n decrement
0297 223D         STX   P  23d   55  23e ......n update pointer
0298 0700         LAX        0    0  23e ......n get saved address
0299 6233         STA   P  233    0  23e ......n interpreter program counter
029A 5289         JMP   P  289    0  23e ......  jump to that address

SBB

1001 00mm mmmm mmmh

Using operand, with LSB (h) determining lower byte or upper byte and dividing operand by two for the word address (m). This byte is then subtracted from the accumulator.

Range of instances9018
Routine address0320
Number of instances2
0320 43DA         JMM   P  3da   55  321 ......n pick up byte, byte address
03DA 2239         STX   P  239   55  321 ......n save return address
03DB 0C91         LRO        1   2a  321 C.....n divide accumulator by 2
03DC 0600         XXA           321   2a C.....n put into X
03DD DE34         LDA IXP  234 4286   2a C.....n A=0473+X=(0234)+X
03DE 0402         SNC      3e1 4286   2a C.....n even accumulator?
03DF B3ED         ANA   P  3ed   86   2a C.....n no, LS byte, 03ED=00FF
03E0 5A39         JMP I P  239   86   2a C.....n return
0321 533A         JMP   P  33a   86   2a C.....n
033A 0100         TWA          ff7a   2a ......n
033B 5336         JMP   P  336 ff7a   2a ......n
0336 8232         ADD   P  232 ff7a   2a ......n accumulator - byte
0337 52AC         JMP   P  2ac ff7a   2a ......n
02AC 6232         STA   P  232 ff7a   2a ......n accumulator
02AD 5289         JMP   P  289 ff7a   2a ......  next instruction

STA <memory>

0110 00mm mmmm mmmm

Store accumulator at memory.

Range of instances6001-6085
Routine address032A
Number of instances203
032A 0600         XXA             0   55 ......n
032B D232         LDA   P  232 ff7a   55 ......n accumulator
032C 6E34         STA IXP  234 ff7a   55 ......n base of interpreter memory
032D 5289         JMP   P  289 ff7a   55 ......  next instruction

STA <memory>,<bit>

0100 00------ mmmm bbbb

Store bit in memory.

Range of instances4011-40ED
Routine address02FE
Number of instances14
02FE C232         LDX   P  232   55   86 ......n
02FF 5303         JMP   P  303   55   86 ......n
0303 2237         STX   P  237   55   86 ......n
0304 43CB         JMM   P  3cb   55  305 ......n extract nibble 3 and 4
03CB 0CB4         LRC        4 5005  305 ......n nibble 3
03CC 723B         STR   P  23b 5005  305 ......n save
03CD 0C9C         LRO       12    5  305 ......n nibble 4
03CE 623C         STA   P  23c    5  305 ......n save
03CF 07C0         JMX        0    5  305 ......n return
0305 08B0         ADI       b0   b5  305 ......n
0306 730D         STR   P  30d   b5  305 ......n self modifying code
0307 D237         LDA   P  237   86  305 ......n
0308 0C91         LRO        1   43  305 ......n
0309 C23B         LDX   P  23b   43    5 ......n
030A 05D0         REX        0   43    5 ......n
030B D3F2         LDA   P  3f2 7fff    5 ......n
030C 01C0         ADC          7fff    5 ......n
030D 0CB5         LRC        5 fbff    5 C.....n modified operand
030E 0412         SNV      311 fbff    5 C.....n
0311 BE34         ANA IXP  234 1000    5 C.....n 
0312 532C         JMP   P  32c 1000    5 C.....n
032C 6E34         STA IXP  234 1000    5 C.....n
032D 5289         JMP   P  289 1000    5 C.....  next instruction

STB <memory>

1000 00mm mmmm mmmh

Using accumulator, with LSB (h) determining lower byte or upper byte and dividing accumulator by two for the word address (m). The byte is stored in memory.

Range of instances8001-80AA
Routine address0354
Number of instances78
0354 C232         LDX   P  232   55   86 ......n accumulator
0355 5323         JMP   P  323   55   86 ......n
0323 0C91         LRO        1   2a   86 C.....n divide accumulator by 2
0324 0600         XXA            86   2a C.....n put into X
0325 0402         SNC      328   86   2a C.....n even accumulator?
0326 7E34         STR IXP  234   86   2a C.....n no, store right
0327 5289         JMP   P  289   86   2a C.....  next instruction

SUB <memory>

0111 00mm mmmm mmmm

Subtract memory from accumulator.

Range of instances700F-7082
Routine address0338
Number of instances17
0338 0600         XXA             0   55 ......n
0339 DE34         LDA IXP  234 c1d3   55 ......n base of interpreter memory
033A 0100         TWA          3e2d   55 ......n negate
033B 5336         JMP   P  336 3e2d   55 ......n
0336 8232         ADD   P  232 3e2d   55 ......n accumulator - memory
0337 52AC         JMP   P  2ac 3e2d   55 ......n
02AC 6232         STA   P  232 3e2d   55 ......n accumulator
02AD 5289         JMP   P  289 3e2d   55 ......  next instruction

SUB immediate

1011 00nn nnnn nnnn

Subtract immediate from accumulator.

Range of instancesB001-B0B7
Routine address033A
Number of instances32
033A 0100         TWA          ffab    0 ......n negate operand
033B 5336         JMP   P  336 ffab    0 ......n
0336 8232         ADD   P  232 3dd8    0 C.....n accumulator - immediate
0337 52AC         JMP   P  2ac 3dd8    0 C.....n
02AC 6232         STA   P  232 3dd8    0 C.....n accumulator
02AD 5289         JMP   P  289 3dd8    0 C.....  next instruction

XOR <memory>

1011 11mm mmmm mmmm

Memory exclusive ored with accumulator.

Range of instancesBC0E-BC44
Routine address02DB
Number of instances8
02DB 0600         XXA             0   55 ......n
02DC DE34         LDA IXP  234 c1d3   55 ......n base of interpreter memory
02DD B232         ANA   P  232 c1d3   55 ......n accumulator
02DE 6238         STA   P  238 c1d3   55 ......n
02DF DE34         LDA IXP  234 c1d3   55 ......n base of interpreter memory
02E0 A232         ORA   P  232 fddb   55 ......n accumulator
02E1 9238         SUB   P  238 3c08   55 ......n
02E2 52AC         JMP   P  2ac 3c08   55 ......n
02AC 6232         STA   P  232 3c08   55 ......n accumulator
02AD 5289         JMP   P  289 3c08   55 ......  next instruction

?

0011 11?? ???? ????

?.

Range of instances3C0C
Routine address038E
Number of instances1
038E 6238         STA   P  238   55    0 ......n
...

?

0101 11?? ???? ????

?.

Range of instances5C00
Routine address0382
Number of instances1
0382 43C1         JMM   P  3c1   55  383 ......n
...

?

0111 10mm mmmm mmmm

?.

Range of instances781F-786A
Routine address033F
Number of instances23
033F 0600         XXA             0   55 ......n operand to X
0340 DE34         LDA IXP  234 c1d3   55 ......n base of interpreter memory
0341 04D2         SAG      344 c1d3   55 ......n
0342 0100         TWA          3e2d   55 ......n
0343 08B0         ADI       b0 3edd   55 ......n
0344 0810         ADI       10 3eed   55 ......n
0345 7347         STR   P  347 3eed   55 ......n self modifying code
0346 D232         LDA   P  232    0   55 ......n accumulator
0347 0CED         NOP             0   55 ......n modified operand of LLO
0348 52AC         JMP   P  2ac    0   55 ......n
02AC 6232         STA   P  232    0   55 ......n accumulator
02AD 5289         JMP   P  289    0   55 ......  next instruction

?

0111 11?? ???? ????

?.

Range of instances7C00
Routine address036C
Number of instances5
036C D232         LDA   P  232    0    0 ......n accumulator
036D 0C98         LRO        8    0    0 ......n
036E 0600         XXA             0    0 ......n
036F D225         LDA   P  225    1    0 ......n
0370 0C91         LRO        1    0    0 C.....n
0371 0600         XXA             0    0 C.....n
0372 0402         SNC      375    0    0 C.....n
0373 7601         STR  XP  201    0    0 C.....n
0374 5376         JMP   P  376    0    0 C.....n
0376 E225         INC   P  225    0    0 C.....n
0377 D225         LDA   P  225    2    0 C.....n
0378 0948         SBI       48 ffba    0 C.....n
0379 04B1         SAN      37b ffba    0 C.....n
037B 5289         JMP   P  289 ffba    0 C....

?

1001 10?? ???? ????

?.

Range of instances981C-986C
Routine address037C
Number of instances4
037C F3F3         CAA   P  3f3   55    0 ......n
...

?

1010 00mm mmmm mmmm

?.

Range of instancesA02F-A049
Routine address02AE
Number of instances5
02AE 0600         XXA             0   55 ......n
02AF 0540         CLA             0   55 ......n
02B0 6237         STA   P  237    0   55 ......n
02B1 6239         STA   P  239    0   55 ......n
02B2 D232         LDA   P  232    0   55 ......n accumulator
02B3 04D3         SAG      2b7    0   55 ......n
02B4 0100         TWA             0   55 C.....n
02B5 E239         INC   P  239    0   55 C.....n
02B6 6232         STA   P  232    0   55 C.....n accumulator
02B7 DE34         LDA IXP  234 c1d3   55 C.....n base of interpreter memory
02B8 C3EF         LDX   P  3ef c1d3    1 C.....n
02B9 04D3         SAG      2bd c1d3    1 C.....n
02BA 04AE         SAZ      2c9 c1d3    1 C.....n
02BB 0100         TWA          3e2d    1 ......n
02BC E239         INC   P  239 3e2d    1 ......n
02BD 0C11         LLO        1 7c5a    1 ......n
02BE 04B2         SAN      2c1 7c5a    1 ......n
02BF 0201         INX      2c1 7c5a    2 ......n
02C0 52BD         JMP   P  2bd 7c5a    2 ......n
02BD 0C11         LLO        1 f8b4    2 ......n
02BE 04B2         SAN      2c1 f8b4    2 ......n
02C1 0C91         LRO        1 7c5a    2 ......n
02C2 6238         STA   P  238 7c5a    2 ......n
02C3 0100         TWA          83a6    2 ......n
02C4 8232         ADD   P  232 83a6    2 ......n accumulator
02C5 04B1         SAN      2c7 83a6    2 ......n
02C7 D237         LDA   P  237    0    2 ......n
02C8 0C21         LLI        1    0    2 ......n
02C9 6237         STA   P  237    0    2 ......n
02CA D238         LDA   P  238 7c5a    2 ......n
02CB 0241         DNX      2cd 7c5a    1 ......n
02CC 52C1         JMP   P  2c1 7c5a    1 ......n
02C1 0C91         LRO        1 3e2d    1 ......n
02C2 6238         STA   P  238 3e2d    1 ......n
02C3 0100         TWA          c1d3    1 ......n
02C4 8232         ADD   P  232 c1d3    1 ......n accumulator
02C5 04B1         SAN      2c7 c1d3    1 ......n
02C7 D237         LDA   P  237    0    1 ......n
02C8 0C21         LLI        1    0    1 ......n
02C9 6237         STA   P  237    0    1 ......n
02CA D238         LDA   P  238 3e2d    1 ......n
02CB 0241         DNX      2cd 3e2d    0 ......n
02CD D239         LDA   P  239    2    0 ......n
02CE 04C3         SLZ      2d2    2    0 ......n
02D2 52AB         JMP   P  2ab    2    0 ......n
02AB D237         LDA   P  237    0    0 ......n
02AC 6232         STA   P  232    0    0 ......n accumulator
02AD 5289         JMP   P  289    0    0 ......

?

1100 ???? ???? ????

?.

Range of instancesC009-CEB5
Routine address0349
Number of instances169
0349 723B         STR   P  23b   55    0 ......n
034A DA33         LDA I P  233 8a00    0 ......n
034B 0C99         LRO        9   45    0 ......n
034C 8236         ADD   P  236   45    0 ......n
034D 6232         STA   P  232   45    0 ......n
034E DA32         LDA I P  232 426a    0 ......n
034F EA32         INC I P  232 426a    0 ......n
0350 0405         SNC      356 426a    0 ......n
0356 6232         STA   P  232 426a    0 ......n
0357 D23B         LDA   P  23b   55    0 ......n
0358 43DA         JMM   P  3da   55  359 ......n pick up byte, byte address
03DA 2239         STX   P  239   55  359 ......n save return address
03DB 0C91         LRO        1   2a  359 C.....n divide accumulator by 2
03DC 0600         XXA           359   2a C.....n put into X
03DD DE34         LDA IXP  234 4286   2a C.....n A=0473+X=(0234)+X
03DE 0402         SNC      3e1 4286   2a C.....n even accumulator?
03DF B3ED         ANA   P  3ed   86   2a C.....n no, LS byte, 03ED=00FF
03E0 5A39         JMP I P  239   86   2a C.....n return
0359 6237         STA   P  237   86   2a C.....n
035A D232         LDA   P  232 426a   2a C.....n
035B 0C91         LRO        1 2135   2a ......n
035C 623A         STA   P  23a 2135   2a ......n
035D E232         INC   P  232 2135   2a ......n
035E D237         LDA   P  237   86   2a ......n
035F 0402         SNC      362   86   2a ......n
0362 3A3A         STL I P  23a   86   2a ......n
0363 5289         JMP   P  289   86   2a ......  next instruction

?

1110 01mm mmmm mmmm

?.

Range of instancesE45C-E485
Routine address0386
Number of instances2
0386 0600         XXA             0   55 ......n
0387 DE34         LDA IXP  234 c1d3   55 ......n
0388 6238         STA   P  238 c1d3   55 ......n
0389 43C1         JMM   P  3c1 c1d3  38a ......n
03C1 D232         LDA   P  232 426b  38a ......n
03C2 223A         STX   P  23a 426b  38a ......n
03C3 0C91         LRO        1 2135  38a C.....n
03C4 0600         XXA           38a 2135 C.....n
03C5 0700         LAX        0 8600 2135 C.....n
03C6 5A3A         JMP I P  23a 8600 2135 C.....n
038A 623C         STA   P  23c 8600 2135 C.....n
038B 0701         LAX        1    0 2135 C.....n
038C 6232         STA   P  232    0 2135 C.....n
038D 5279         JMP   P  279    0 2135 C.....n
0279 D232         LDA   P  232    0 2135 C.....n
027A 9238         SUB   P  238 3e2d 2135 C.....n
027B 04AD         SAZ      289 3e2d 2135 C.....n
027C 526D         JMP   P  26d 3e2d 2135 C.....

Hexadecimal Values of Interpreter Codes

high byte, high nibble
high
byte,
low
nibble
01 23 45 67 89 AB CD EF
0 RTSJSRJGTJNE STA bitBTCSTASUB STBSBB?SUB imd ?n/aERRn/a
1 """" """" ""?" ?n/a"n/a
2 """" """" ""?" ?n/a"n/a
3 """" """" ""?" ?n/a"n/a
4 OUT""" LDA bitBSLDACLR LDBCLBLDA imdAND ?n/a?n/a
5 """" """" """" ?n/a?n/a
6 """" """" """" ?n/a?n/a
7 """" """" """" ?n/a?n/a
8 JMPJEQJMIJMP ind CMP bitBCCMP? CMB?CMP imdOR ?n/an/an/a
9 """" """? "?"" ?n/an/an/a
A """" """? "?"" ?n/an/an/a
B """" """? "?"" ?n/an/an/a
C """? BTS?ADD? ADBMULADD imdXOR ?n/an/an/a
D """? "?"? """" ?n/an/an/a
E """? "?"? """" ?n/an/an/a
F """? "?"? """" n/an/an/a
?
unknown operation
n/a
not available (unimplemented)